home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / hce.lha / HCE / LibSource / AmigaLib / EXTRAS / Source / CreateStdIO.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-02  |  659 b   |  27 lines

  1. /* Modified by (J.P). */
  2.  
  3. #include <exec/types.h>
  4. #include <exec/ports.h>
  5. #include <exec/memory.h>
  6. #include <exec/io.h>
  7.  
  8. struct IOStdReq *CreateStdIO (taskReplyPort)
  9. struct MsgPort *taskReplyPort;
  10. {
  11.     struct IOStdReq *myStdReq;
  12.  
  13.     if (!taskReplyPort)
  14.         return(NULL);
  15.  
  16.      myStdReq=(struct IOStdReq *)AllocMem ((ULONG)sizeof (struct IOStdReq),
  17.                            (ULONG)MEMF_CLEAR | MEMF_PUBLIC);
  18.         if (myStdReq) {
  19.             myStdReq->io_Message.mn_Node.ln_Type = NT_MESSAGE;
  20.             myStdReq->io_Message.mn_Node.ln_Pri = 0;
  21.             myStdReq->io_Message.mn_ReplyPort = taskReplyPort;
  22.             }
  23.  
  24.     return (myStdReq);
  25. }
  26.  
  27.